<%@ page language="java" contentType="text/html; charset=UTF-8"	pageEncoding="UTF-8"%>
<%request.setAttribute("path", request.getContextPath());%>
<jsp:include page="head.jsp" />
<link rel="stylesheet" type="text/css" href="${path}/resources/css/monitor-alarm.min.css?" />
<jsp:include page="nav.jsp" />
<div id="content">
	<div id="breadcrumb">
		<a href="#" title="Go to Home" class="tip-bottom"><i
			class="icon-home"></i> Home</a> <a href="#" class="current">alarm</a>
	</div>
	<div class="content-table">
		<div style="margin : 10px 0 0 0">&nbsp;<button class="btn btn-inverse update-btn"><i class="icon-refresh icon-white"></i> Refresh</button>
			&nbsp;<button class="btn btn-inverse" id="config-btn"><i class="icon-asterisk icon-white"></i> Config</button>
		</div>
		<div class="">
			<div class="">
				<div class="widget-box">
					<div class="widget-title">

						<h5>alarm table</h5>
						<h5><a id="prev" href="javascript:void(0);">上一页</a><a id="next" href="javascript:void(0);">下一页</a></h5>
					</div>
					<div class="widget-content nopadding">
						<table class="table table-bordered table-striped" id="alarm-table">
							<thead>
								<tr>
									<th>告警时间</th>
									<th>告警信息</th>
									<th>已通知</th>
									<th>更新时间</th>
								</tr>
							</thead>
							<tbody id="alarm">
							</tbody>
						</table>
					</div>
					<div class="loading" id="loading"></div>
				</div>
			</div>
		</div>
	</div>
</div>

<div class="modal fade in hide" id="config-modal">
  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
    <h3>Config</h3>
  </div>
  <div class="modal-body">
    <form id="alarm_form" method="post">
    <fieldset>
    	<legend>是否开启错误告警<input type="checkbox" class="span1" id="faliureTrigger"/></legend>
    	<div>
    	<label for="">Agent响应(分钟)</label>
    		<input type="text" id="agentThreshold" placeholder=""/>
    	</div>
    	<div>
    	<label for="">服务响应(分钟)</label>
    		<input type="text" id="serviceThreshold" placeholder=""/>
    	</div>
    	<div>
    	<label for="">健康服务接口地址</label>
    	<input type="text" id="healthUrl" placeholder=""/>
    	<button id="alarm_inspector"  class="btn btn-primary" data-complete-text="检测成功" data-error-text="检测失败" data-loading-text="正在检测...">检测</button>
    	</div>
    </fieldset>
    <fieldset>
	    <legend>队列中任务阈值</legend>
	    <div>
	    	<label for="">队列中任务阈值</label>
	   		<input type="text" id="unProcessNumber" placeholder="">
   		</div>
   		<div>
    		<label for="">平均等待时间(秒)</label>
    		<input type="text" id="waitingTimeThreshold" placeholder="">
    	</div>
    </fieldset>
    <fieldset>
	    <legend>任务失败率(%)</legend>
	    <div>
	    	<label for="">失败率阈值</label>
    		<input type="text" id="failureRateTheshold" placeholder="">
    	</div>
    </fieldset>
    
    <fieldset>
	    <legend>告警通知</legend>
	    <div>
	    	<label for="">通知地址：</label>
    		<input type="text" id="sendTo" placeholder="">
    	</div>
    </fieldset>
     <div class="modal-footer">
         <button type="submit" class="btn btn-primary" data-complete-text="提交成功" data-loading-text="正在提交...">提交</button>
         <span id="errorMsg" class="errorMsg" style="color : red"></span>
        
	  </div>
     </form>
  </div>
 
</div>
<%@ include file="footer.jsp"%>
<script src="${path}/resources/js/monitor-alarm.min.js"></script>
</html>
